<nz-modal [(nzVisible)]="isVisible" [nzWidth]="modalWidth" (nzOnCancel)="onBack()" [nzStyle]="{'top': '50px'}">
  <div *nzModalTitle>{{ title }}</div>
  <ng-container *nzModalContent>
    <form nz-form class="search-form" [formGroup]="searchForm" (keydown.enter)="$event.preventDefault();onSearch()" nzLayout="inline">
            <nz-form-item>
        <nz-form-label nzFor="universityName">学校名称</nz-form-label>
        <nz-form-control>
          <nz-input-group nzSearch [nzAddOnAfter]="universityNameSuffixIconButton">
            <input nz-input formControlName="universityName" placeholder="请选择学校名称" readonly />
          </nz-input-group>
          <ng-template #universityNameSuffixIconButton>
            <button nz-button nzType="primary" nzSearch (click)="findUniversity()"><nz-icon nzType="search" /></button>
          </ng-template>
        </nz-form-control>
      </nz-form-item>
<nz-form-item>
        <nz-form-label nzFor="name">院系名称</nz-form-label>
        <nz-form-control>
          <input nz-input formControlName="name" placeholder="请输入院系名称" />
        </nz-form-control>
      </nz-form-item>
      <button nz-button type="button" nzType="primary" [nzLoading]="searchLoading" (click)="onSearch()">查询</button>
      <button nz-button type="button" class="margin-button" (click)="onReset()">重置</button>
    </form>
    <nz-table #basicTable [nzData]="listOfData" [nzTotal]="total" [nzLoading]="searchLoading" nzSize="small">
      <thead>
        <tr>
          <th>学校名称</th>
          <th>院系名称</th>
          <th>成立日期</th>
          <th>联系电话</th>
          <th>邮箱</th>
          <th>办公地点</th>
          <th>院系网址</th>
          <th>院系简介</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let data of basicTable.data" (dblclick)="onRowDblClick(data, $event)">
          <td>{{data.universityName}}</td>
          <td>{{data.name}}</td>
          <td>{{data.establishmentDate}}</td>
          <td>{{data.contactPhone}}</td>
          <td>{{data.email}}</td>
          <td>{{data.officeLocation}}</td>
          <td>{{data.website}}</td>
          <td class="ellipsis">{{data.facultyDescription}}</td>
        </tr>
      </tbody>
    </nz-table>
  </ng-container>
  <div *nzModalFooter>
    <div class="form-button-container">
      <button nz-button nzType="default" (click)="onBack()">关闭</button>
    </div>
  </div>
</nz-modal>
<university-selector (universitySelectedEvent)="handleUniversitySelectedEvent($event)"></university-selector>
